//
//  Enemy.m
//  Return Of The Lemi
//
//  Created by Paul Vishayanuroj on 11/2/09.
//  Copyright 2009 Cornell University. All rights reserved.
//

#import "Enemy.h"


@implementation Enemy

- (void) update
{

}

// Returns the Euclidean distance from enemy to player
- (CGFloat) distToPlayer
{
	CGPoint playerPos = [_player getPosition];
	CGPoint enemyPos = [self getPosition];
	CGFloat deltaX = playerPos.x - enemyPos.x;
	CGFloat deltaY = playerPos.y - enemyPos.y;
	
	return sqrt(deltaX * deltaX + deltaY * deltaY);
}

@end
